<template>
  <div id="app">
    <div id="nav">
      <router-link to="/" @click.native="handleClick">Home</router-link> |
      <router-link to="/about">About</router-link>
      <hello-world @click.native="handleHello"></hello-world>
      <a href="/about" @click.prevent="handleAbout"></a>
      <!-- <div class="test"></div> -->
    </div>
    <router-view />
  </div>
</template>
<script>
import HelloWorld from "./components/HelloWorld.vue";
export default {
  methods: {
    handleClick() {
      console.log(1);
    },
    handleHello(){
      console.log(2);
    }
  },
  components: {
    HelloWorld,
  },
};
</script>
<style>
#app{
    width:10rem;
    margin-left:auto;
    margin-right:auto;
}
</style>
